package com.smile.f213;
import java.awt.BorderLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
public class BorderLayoutDemo {
	public static void main(String[] args) {
		JFrame frame = new JFrame("BorderLayout示例程序");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		JButton northButton = new JButton("Notrh的按钮");
		JButton southButton = new JButton("Soutrh的按钮");
		JButton WestButton = new JButton("West的按钮");
		JButton EastButton = new JButton("East的按钮");
		JButton centerButton = new JButton("Center的按钮");
		frame.getContentPane().add(northButton,BorderLayout.NORTH);
		frame.getContentPane().add(southButton,BorderLayout.SOUTH);
		frame.getContentPane().add(WestButton,BorderLayout.WEST);
		frame.getContentPane().add(EastButton,BorderLayout.EAST);
		frame.getContentPane().add(centerButton,BorderLayout.CENTER);
		frame.pack();
		frame.setVisible(true);
	}
}